package coop.bancocredicoop.proyectos.gd.service;

import coop.bancocredicoop.proyectos.gd.alfresco.WebScriptResultWithVersion;
import coop.bancocredicoop.proyectos.gd.domain.Document;

public class DocumentCreationResult {

	private Document document;
	private WebScriptResultWithVersion wsresult;
	
	public DocumentCreationResult(WebScriptResultWithVersion wsresult) {
		this.wsresult = wsresult;
		this.document = null;
	}
	
	public DocumentCreationResult(WebScriptResultWithVersion wsresult, Document document) {
		this.wsresult = wsresult;
		this.document = document;
	}

	public Document getDocument() {
		return document;
	}

	public WebScriptResultWithVersion getWSResult() {
		return wsresult;
	}

	public boolean documentWasCreated() {
		return document != null && wsresult.isSuccessful();
	}
	
}
